package hu.bme.mit.rifl.sde.extensions.impl;

import hu.bme.mit.rifl.datamodel.Order;
import hu.bme.mit.rifl.sde.extensions.Merger;

public class MergerImpl implements Merger {

	@Override
	public Order merge(Order orderServed, Order orderBooked) {
		if((orderServed.getState().equalsIgnoreCase("GETTINGSERVED")) && (orderBooked.isBooked())){
			orderServed.setBooked(true);
			return orderServed;
		}
		return null;
	}
}